<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{$product['title']}</title>
<meta name="keywords" content="{$product['keywords']}" />
<meta name="description" content="{$product['description']}" />
<link href="{$GLOBALS['S']['jwcdnapi']}{$GLOBALS['skin']}style/style.css" rel="stylesheet" type="text/css" />
<link href="{$GLOBALS['S']['jwcdnapi']}{$GLOBALS['skin']}style/product.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
var site_dir="{$GLOBALS['WWW']}";
</script>
{include="js.html"}
<script src="{$GLOBALS['S']['jwcdnapi']}{$GLOBALS['skin']}js/goods.js" type="text/javascript"></script>
</head>

<body>
{include="head.html"}
<div class="wpm list">
  <div class="tab11"></div>
  <div class="tab1 tab1b main">
    <div class="l">
      <div class="columnc"><h2>{$type['classname']}</h2></div>
      <div class="columncl">
      {loop table="classtype" pid="$type["tid"]" mshow="1" not="1" as="t"}
      <a href="{$t['url']}"{if($type['tid']==$t['tid'])} class="c"{/if}>{$t['classname']} </a>
      {/loop}
      </div>
    </div>
    <div class="r">
    <div class="content">
		<div class="position">当前位置：{$positions}</div>
        <div class="c">
        	<table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="310">
                <div id="imgto">
                <div class="big"><?php $photos=fileall($product['photo']); ?><img src="{$photos[0][0]}" title="{$photos[0][1]}" /></div>
                <div class="small">
                    <div class="imgl"><</div>
                    <div class="imgc">
                        <ul>
                        {foreach $photos as $pk=>$ps}
                      	<li{if($pk==0)} class="the"{/if}><img src="{$ps[0]}" title="{$ps[1]}" /></li>
                        {/foreach}
                        </ul>
                    </div>
                    <div class="imgr">></div>
                </div>
                </div>
                </td>
                <td width="15"></td>
                <td><h1 style="text-align:left;">{$product['title']}</h1>
                <form action="{$GLOBALS['WWW']}index.php?c=pay&id={$product['id']}" id="goods" method="post">
                <div class="attribute" id="attribute">
                <input id="price" type="hidden" value="{$product['price']}" />
                <p><strong>价格</strong>：<span class="price">{$product['price']}</span> 元</p>
                {foreach $attribute_type as $v}
                  	<p class="aprice"><strong>{$v['name']}</strong>：
                    {foreach product_attribute($v['tid'],$product['id']) as $a}
                   	<span>{$a['name']}<input name="aprice" type="checkbox" value="{$a['price']}" style="display:none;" /><input name="attribute[{$v['tid']}]" type="checkbox" value="{$a['sid']}" style="display:none;" /></span>
                    {/foreach}
					</p>
                {/foreach}
                <p><strong>购买数量</strong>： <input name="quantity" type="text" value="1" class="ins" style="width:40px;" /> {$type['unit']}</p>
                </div>
                <div class="buy"><input type="submit" class="inbuy" value="立即购买" />{if($product['virtual']=='0')} <input type="button" class="incart" onclick="cartbox({$product['id']});" value="放入购物车" />{/if}</div>
                </form>
                <div class="pinfo">
                {if($product['virtual']=='0')}
                    物流费用：
                    {if($product['logistics']=='0')}
                        免物流费
                    {else}
                        {foreach (unserialize($product['logistics'])) as $k=>$l}
                        {if($l!=0)}{$k} <strong>{$l}</strong> 元{/if}
                        {/foreach}
                    {/if}
                {else}
                	自动发货
                {/if}<br /><span>更新：{fun date('Y-m-d',$product['addtime'])}</span><span>已售出 <strong>{$record}</strong> {$type['unit']}</span><span>浏览：<script src="{$GLOBALS['WWW']}index.php?c=product&a=hits&id={$product['id']}" type="text/javascript"></script></span>
                </div>
                </td>
              </tr>
            </table>
        </div>
        <div class="c labels"><span onclick="labels(this,'span','p_labels','p_s1');">产品介绍</span><span onclick="labels(this,'span','p_labels','p_s2');" class="current">销售记录</span></div>
        <div class="c">
            <div class="p_labels" id="p_s1">
                <div class="f2">{$product['body']}</div>
                <ul class="pages">{$pages}</ul>
            </div>
            <ul class="p_labels record none" id="p_s2">
            </ul>
            <script type="text/javascript">ajax_record('p_s2',{$product['id']},1,'product/ajax_record.html');</script>
        </div>
        <div class="c prev">
        	{if($aprev)}上一篇：<a href="{$aprev['url']}">{$aprev['title']}</a>{/if}
            {if($anext)}下一篇：<a href="{$anext['url']}">{$anext['title']}</a>{/if}
        </div>
	</div>
       <div class="comment">
         <div class="t c">产品咨询</div>
         <div class="i c">
<script type="text/javascript">
function comment_ret(){
	if(document.comment.body.value.length==''){alert("请输入咨询内容！");return false;}
	if(document.comment.vercode.value.length==''){alert("请输入验证码！");return false;}
	if(document.comment.body.value.length>500){alert("咨询内容不能超过500字！");return false;}
}
</script>
         <form method="post" action="{$GLOBALS['WWW']}index.php?c=comment&m={$molds}" name="comment" onsubmit="return comment_ret()">
         <input name="aid" type="hidden" value="{$product['id']}" />
         <dl><dt>内容:</dt><dd><textarea name="body" style="width:500px; height:50px;" class="inp"></textarea></dd></dl>
         <dl>{if($GLOBALS['G_DY']['vercode']==1)}<dt>验证码:</dt><dd><input name="vercode" type="text" style="width:50px;" class="inp" /></dd><dd><img src="{$GLOBALS['WWW']}include/vercode.php" id="vercodeimg" width="58" height="24" onclick="newvercode();" style="cursor:pointer;" /></dd>
<script type="text/javascript">
setTimeout('newvercode()',1000);
function newvercode(){
	document.getElementById("vercodeimg").src="{$GLOBALS['WWW']}include/vercode.php?a="+Math.random();
}
</script>
         {else}<dt>&nbsp;</dt>{/if}<dd><input name="" type="submit" value="提交" class="btnmini" /></dd></dl>

         </form>
         </div>
         <script type="text/javascript">ajax_comment('comment','product',{$product['id']},1,'product/ajax_comment.html');</script>
         <div id="comment"></div>
       </div>
    </div>
  </div>
  <div class="tab12 mban"></div>
</div>
{include="bottom.html"}
</body>
</html>
